﻿using System;
using System.Collections.Generic;
using System.Text;

namespace System.Peppers.UI
{
    /// <summary>
    /// Flags that define appearance and behaviour of a standard message box displayed by a call to the MessageBox function.
    /// </summary>
    [Flags]
    public enum MessageBoxOptions : uint
    {
        /// <summary>
        /// Default, only OK button
        /// </summary>
        Ok = 0x000000,
        /// <summary>
        /// OK, Cancel buttons
        /// </summary>
        OkCancel = 0x000001,
        /// <summary>
        /// Abort/Retry/Ignore buttons
        /// </summary>
        AbortRetryIgnore = 0x000002,
        /// <summary>
        /// Yes/No/Cancel buttons
        /// </summary>
        YesNoCancel = 0x000003,
        /// <summary>
        /// Yes/No buttons
        /// </summary>
        YesNo = 0x000004,
        /// <summary>
        /// Retry/Cancel buttons
        /// </summary>
        RetryCancel = 0x000005,
        /// <summary>
        /// Cancel/Retry/Continue buttons
        /// </summary>
        CancelTryContinue = 0x000006,

        /// <summary>
        /// Puts Hand icon
        /// </summary>
        IconHand = 0x000010,
        /// <summary>
        /// Puts Question icon
        /// </summary>
        IconQuestion = 0x000020,
        /// <summary>
        /// Puts Exclamation icon
        /// </summary>
        IconExclamation = 0x000030,
        /// <summary>
        /// Puts error icon
        /// </summary>
        IconAsterisk = 0x000040,
        /// <summary>
        /// Puts special icon
        /// </summary>
        UserIcon = 0x000080,

        //IconWarning = IconExclamation,
        //IconError = IconHand,
        //IconInformation = IconAsterisk,
        //IconStop = IconHand,

        /// <summary>
        /// Button 1 is default
        /// </summary>
        DefButton1 = 0x000000,
        /// <summary>
        /// Button 2 is default
        /// </summary>
        DefButton2 = 0x000100,
        /// <summary>
        /// Button 3 is default
        /// </summary>
        DefButton3 = 0x000200,
        /// <summary>
        /// Button 4 is default
        /// </summary>
        DefButton4 = 0x000300,

        /// <summary>
        /// Makes window modal in application, default
        /// </summary>
        ApplicationModal = 0x000000,
        /// <summary>
        /// Makes window a system modal window
        /// </summary>
        SystemModal = 0x001000,
        /// <summary>
        /// Makes window a task modal window
        /// </summary>
        TaskModal = 0x002000,

        /// <summary>
        /// Adds help button
        /// </summary>
        Help = 0x004000,
        /// <summary>
        /// Does not give focus to window
        /// </summary>
        NoFocus = 0x008000,

        /// <summary>
        /// ??
        /// </summary>
        SetForeground = 0x010000,
        /// <summary>
        /// ??
        /// </summary>
        DefaultDesktopOnly = 0x020000,
        /// <summary>
        /// Topmost window
        /// </summary>
        Topmost = 0x040000,
        /// <summary>
        /// ??
        /// </summary>
        Right = 0x080000,
        /// <summary>
        /// ??
        /// </summary>
        RTLReading = 0x100000,
    }

    /// <summary>
    /// Represents possible values returned by the MessageBox function.
    /// </summary>
    public enum MessageBoxResult : uint
    {
        /// <summary>
        /// OK was pressed
        /// </summary>
        Ok = 1,
        /// <summary>
        /// Cancel was pressed
        /// </summary>
        Cancel,
        /// <summary>
        /// Abort pressed
        /// </summary>
        Abort,
        /// <summary>
        /// Retry was pressed
        /// </summary>
        Retry,
        /// <summary>
        /// Ignore was pressed
        /// </summary>
        Ignore,
        /// <summary>
        /// Yes was pressed
        /// </summary>
        Yes,
        /// <summary>
        /// No was pressed
        /// </summary>
        No,
        /// <summary>
        /// Close was pressed
        /// </summary>
        Close,
        /// <summary>
        /// Help was pressed
        /// </summary>
        Help,
        /// <summary>
        /// Try again was pressed
        /// </summary>
        TryAgain,
        /// <summary>
        /// Continue was pressed
        /// </summary>
        Continue,
        /// <summary>
        /// User interaction timed out
        /// </summary>
        Timeout = 32000
    }
}
